<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>卫星图像处理系统</title>
    <link rel="stylesheet" href="/layui/css/layui.css">
    <link rel="stylesheet" href="/css/loading-icon.css">
</head>
<body>
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <div class="layui-logo layui-hide-xs layui-bg-black">
            卫星图像处理系统
        </div>
        <!-- 头部区域（可配合layui 已有的水平导航） -->
        <ul class="layui-nav layui-layout-left">
            <!-- 移动端显示 -->
            <li class="layui-nav-item layui-show-xs-inline-block layui-hide-sm" lay-header-event="menuLeft">
                <i class="layui-icon layui-icon-spread-left" id="leftEnumIcon"></i>
            </li>

<!--            <li class="layui-nav-item"><a href="">卫星地图</a></li>-->
            <li class="layui-nav-item">
                <a href="javascript:;">实验室</a>
                <dl class="layui-nav-child">
                    <dd><a href="/common/HomePage" target="main_viewer">实时检测</a></dd>
                    <dd><a href="/common/HomePage" target="main_viewer">任意裁剪</a></dd>
                    <dd><a href="/common/HomePage" target="main_viewer">图像超采样</a></dd>
                </dl>
            </li>
        </ul>
        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item layui-hide layui-show-md-inline-block">
                <a href="javascript:;">
                    <img src="/images/test.png" class="layui-nav-img">
                    <span th:text="${authentication.getName()}"></span>
                </a>
                <dl class="layui-nav-child">
                    <dd><a href="/common/HomePage" target="main_viewer">历史检测记录</a></dd>
                    <dd><a href="/common/HomePage" target="main_viewer">账号设置</a></dd>
                    <dd><a href="/logout">登出</a></dd>
                </dl>
            </li>
        </ul>
    </div>

    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
            <ul class="layui-nav layui-nav-tree" lay-filter="test">
                <li class="layui-nav-item">
                    <a href="/common/target_extraction" target="main_viewer" class="end-btn">目标提取</a>
                </li>
                <li class="layui-nav-item">
                    <a href="/common/change_detection" target="main_viewer" class="end-btn">变化检测</a>
                </li>
                <li class="layui-nav-item">
                    <a href="/common/feature_classification" target="main_viewer" class="end-btn">地物分类</a>
                </li>
                <li class="layui-nav-item">
                    <a href="/common/object_detection" target="main_viewer" class="end-btn">目标检测</a>
                </li>
<!--                <li class="layui-nav-item">-->
<!--                    <a href="javascript:;">巡检信息</a>-->
<!--                    <dl class="layui-nav-child">-->
<!--                        <dd><a href="/InspectionRouteListController/queryAllMVC"  class="end-btn" target="main_viewer">巡检线路</a></dd>-->
<!--                        <dd><a href="/InspectionPositionController/queryByMVC"  class="end-btn" target="main_viewer">巡检部位</a></dd>-->
<!--                        <dd><a href="/InspectionPointController/queryByMVC"  class="end-btn" target="main_viewer">巡检点</a></dd>-->
<!--                    </dl>-->
<!--                </li>-->
<!--                <li class="layui-nav-item">-->
<!--                    <a href="javascript:;">巡检管理</a>-->
<!--                    <dl class="layui-nav-child">-->
<!--                        <dd><a href="/PersonListController/queryAllMVC"  class="end-btn" target="main_viewer">人员管理</a></dd>-->
<!--                        <dd><a href="/DepartmentListController/queryAllMVC"  class="end-btn" target="main_viewer">部门管理</a></dd>-->
<!--                    </dl>-->
<!--                </li>-->
            </ul>
        </div>
    </div>

    <div class="layui-body">
        <!-- 内容主体区域 -->
        <div class="sk-three-bounce" id="sk-three-bounce">
            <div class="sk-child sk-bounce1"></div>
            <div class="sk-child sk-bounce2"></div>
            <div class="sk-child sk-bounce3"></div>
        </div>
        <iframe id="main_viewer" name="main_viewer" th:src="@{/common/HomePage}" style="height: 100%;width: 100%;border-width: 0"
        onload="LoadOK()">

        </iframe>
    </div>


    <div class="layui-footer">
        <!-- 底部固定区域 -->
        欢迎访问卫星图像处理系统
    </div>
</div>
<script type="text/javascript" src="/js/jquery-3.4.1.js"></script>
<script type="text/javascript" src="/js/index.js"></script>
<script src="/layui/layui.js"></script>
<script>
    //JS
    layui.use(['element', 'layer', 'util'], function(){
        var element = layui.element
            ,layer = layui.layer
            ,util = layui.util
            ,$ = layui.$;

        //头部事件
        util.event('lay-header-event', {
            //左侧菜单事件
            menuLeft: function(othis){
                // layer.msg('展开左侧菜单的操作', {icon: 0});
                var btn = $("#leftEnumIcon");
                if (btn.hasClass('layui-icon-spread-left')) {
                    menuHide(btn);
                    btn.addClass('btn-index');
                } else if (btn.has('layui-icon-shrink-right')) {
                    btn.removeClass('btn-index');
                    menuShow(btn);

                }

                $(window).resize(function () {
                    var width = $(document.body).width();
                    var btn = $("leftEnumIcon");
                    if (width < 1000) {
                        if (btn.hasClass('layui-icon-spread-left')) {
                            menuShow(btn);
                        }
                    } else {
                        if (!btn.hasClass('btn-index')) {
                            if (btn.hasClass('layui-icon-shrink-right')) {
                                menuHide(btn);
                            }
                        }
                    }

                });

                function menuShow(btn) {
                    btn.removeClass('layui-icon-shrink-right').addClass('layui-icon-spread-left');
                    $(".layui-side").animate({width: 'toggle'});
                    $(".zq-logo").animate({width: 'toggle'});
                    $(".layui-body").animate({left: '200px'});
                    $(".layui-footer").animate({left: '200px'});
                }

                function menuHide(btn) {
                    btn.removeClass(' layui-icon-spread-left').addClass('layui-icon-shrink-right');
                    $(".layui-side").animate({width: 'toggle'}); //toggle如果原来div是隐藏的就会把元素显示，如果原来是显示则隐藏
                    $(".zq-logo").animate({width: 'toggle'});
                    $(".layui-body").animate({left: '0px'});
                    $(".layui-footer").animate({left: '0px'});
                }
            }
        });

    });
</script>
</body>
</html>